#ifndef MYCLASS_H
#define MYCLASS_H

#include <QObject>
#include <QMetaEnum>

class MyClass : public QObject
{
    Q_OBJECT
    Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
public:
    explicit MyClass(QObject *parent = 0);
    ~MyClass();

    enum Priority {High, Low, VeryHigh, VeryLow};
    Q_ENUMS(Priority)
signals:
    void priorityChanged(Priority);

public:
    void setPriority(Priority priority)
    {
        m_priority = priority;
        emit priorityChanged(priority);
    }
    Priority priority() const
    { return m_priority; }

private:
    Priority m_priority;
};

#endif // MYCLASS_H
